<?php
/* @var $this DashboardController */

$this->breadcrumbs = array(
    'Dashboard',
);
?>
<?php
$cs = Yii::app()->clientScript;
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/jquery.jqplot.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/scripts/shCore.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/scripts/shBrushJScript.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/scripts/shBrushXml.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/plugins/jqplot.canvasTextRenderer.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/plugins/jqplot.dateAxisRenderer.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/plugins/jqplot.cursor.min.js');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/jquery.jqplot.min.css');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/styles/shCoreDefault.min.css');
$cs->registerScriptFile(Yii::app()->getBaseUrl() . '/js/jqplot/styles/shThemejqPlot.min.css');
?>
<div>
    <div class="example-plot" id="chart" style="width: 600px; height: 400px;" ></div> 
</div>
<script type="text/javascript">
    $(document).ready(function() {
        // Enable plugins like highlighter and cursor by default.
        // Otherwise, must specify show: true option for those plugins.
        $.jqplot.config.enablePlugins = true;
        var line1 =<?php echo $graph1; ?>;
        var plot1 = $.jqplot('chart', [line1], {
            title: 'Daily Booking Chart',
            axes: {
                xaxis: {
                    renderer: $.jqplot.DateAxisRenderer
                }
            },
            seriesDefaults: {
                rendererOptions: {
                    smooth: true
                }
            },
            seriesDefaults: {
                pointLabels: {show: true}
            },
            series: [{lineWidth: 1, markerOptions: {style: 'square'}}]
        });
    });
</script>